<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子模型练习</title>
    <style>
        div{
            border-width:2px;
            border-style: solid;
        }
        #d1{
            width: 100px;
            height: 100px;
            background-color: red;
            margin: 25px 0 0 25px;
            overflow: hidden;
        }
        div>div{
            width: 50%;
            height: 50%;
            background-color: blue;
            margin: 25% 0 0 25%;
        }
        #d2{
            width: 50px;
            height: 50px;
            border-color: #4cae4c;
            margin-left: 125px;
            padding-left: 50px;
            padding-top: 50px;
        }
    </style>
</head>
<body>
    <div id="d1">
        <div></div>
    </div>
    <div id="d2">哈喽</div>
</body>
</html>